chore: add mise git:worksync (gws) task to reconcile worktrees with main#2969
Conversation
https://linear.app/speakeasy/issue/AGE-2441/reconcile-existing-worktrees-with-main-port-mappings-and-db-migrations git:workinit (gwi) is one-shot, so existing worktrees drift as main evolves: new _PORT dependents added to mise.toml never propagate into mise.local.toml (silent breakage — e.g. dashboard OAuth redirects to the default port instead of the remapped one), and new DB migrations aren't applied locally. This adds git:worksync (alias gws), safe to run repeatedly: - Extends zero:remap-ports with --preserve mode: keeps already-assigned _PORT values, randomizes any newly-introduced ports, emits dependent declarations only when absent from mise.local.toml (preserves manual edits). Dedupe via insertion-order Map ensures dependents land after the latest port they reference. - Applies pending Postgres + ClickHouse migrations (--no-migrate to skip). - ./zero detects worktrees and invokes gws --no-migrate so users who re-run the bootstrap script also get port reconcile (migrations stay in ./zero's existing flow).
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
https://linear.app/speakeasy/issue/AGE-2441/reconcile-existing-worktrees-with-main-port-mappings-and-db-migrations
git:workinit(gwi) is one-shot, so existing worktrees drift asmainevolves: new_PORTdependents added tomise.tomlnever propagate intomise.local.toml(silent breakage — e.g. dashboard OAuth redirects to the default port instead of the remapped one), and new DB migrations aren't applied locally.This adds
git:worksync(aliasgws), safe to run repeatedly:zero:remap-portswith--preservemode: keeps already-assigned_PORTvalues, randomizes any newly-introduced ports, emits dependent declarations only when absent frommise.local.toml(preserves manual edits). Dedupe via insertion-orderMapensures dependents land after the latest port they reference.--no-migrateto skip)../zerodetects worktrees and invokesgws --no-migrateso users who re-run the bootstrap script also get port reconcile (migrations stay in./zero's existing flow).